package com.cyt.work.association.model.po;

import com.cyt.base.util.BaseUtil;
import com.cyt.base.util.DictCode;
import com.cyt.sys.model.po.SysUser;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

/**
 * 社团管理-社团管理实体类
 *
 * @author han jun
 * @date 2019-8-30 16:06:11
 */
@Data
@NoArgsConstructor
@Table(name = "cyt_wx_association")
public class WxAssociation implements Serializable {

	/**
     * 主键
     */ 
	@Id
	private String id;

	/**
     * 模块ID
     */ 
	@Column(name = "apply_id")
	private String applyId;

	/**
     * 社团名称
     */ 
	@Column(name = "title")
	private String title;

	/**
     * 工号
     */ 
	@Column(name = "user_number")
	private String userNumber;

	/**
     * 用户姓名
     */ 
	@Column(name = "user_name")
	private String userName;

	/**
	 * 图片的路径
	 */
	@Column(name = "path")
	private String path;

	/**
     * 图片的id
     */ 
	@Column(name = "original_path")
	private String originalPath;

	/**
     * 介绍
     */ 
	@Column(name = "introduction")
	private String introduction;

	/**
     * 是否删除：1-未删除；2-已删除
     */ 
	@Column(name = "remove_tag")
	private String removeTag;

	/**
     * 创建时间
     */ 
	@Column(name = "create_time")
	private Date createTime;

	/**
     * 更新时间
     */ 
	@Column(name = "update_time")
	private Date updateTime;

	/**
     * 创建人
     */ 
	@Column(name = "create_user")
	private String createUser;

	/**
     * 更新人
     */ 
	@Column(name = "update_user")
	private String updateUser;

	/**
	 * 报名记录
	 */
	@Transient
	private String signId;


	/**
	 * 创建对象
	 *
	 * @param sysUser 当前用户信息
	 * @author han jun
	 * @date 2019-8-30 16:06:11
	 */
	public WxAssociation(SysUser sysUser) {
		this.id = BaseUtil.uId();
		this.removeTag = DictCode.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.createUser = sysUser.getId();
		this.updateTime = new Date();
		this.updateUser = sysUser.getId();
	}
}